package com.marisfrolg.util;

import android.os.Handler;
import android.os.Message;


public class EmptyControll implements ReadCodeController{
	private static BarcodeControll barcodeControll = new BarcodeControll();
	static private Handler m_handler = null;
	static public final int BARCODE_READ = 10;
	private static boolean m_stop = false;
	private static boolean start_Scan=false;
	public  void Open() {
		barcodeControll.Barcode_open();
		m_stop = false;
		start_Scan=false;
		new BarcodeReadThread().start();
	}

	public  void Close() {
		m_stop = true;
		start_Scan=false;
		barcodeControll.Barcode_Close();
	}

	public  void scan_start() {	
		barcodeControll.Barcode_StartScan();
		start_Scan=true;
	}

	public  void scan_stop() {

		barcodeControll.Barcode_StopScan();
	}

	static class BarcodeReadThread extends Thread {
		public void run() {
			// TODO Auto-generated method stub
			while (!m_stop) {
				try {
					Thread.sleep(50);
					ReadBarcodeID();
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		};
	}

	public static void ReadBarcodeID() {
	}
	private static class BarcodeControll{
		public BarcodeControll() {
		}
		public void Barcode_open() {
			
		}

		public void Barcode_StopScan() {
			
		}

		public void Barcode_StartScan() {
			
		}

		public void Barcode_Close() {
			
		}
		
	}

	@Override
	public void setHandler(Handler handler) {
		m_handler=handler;
	}

	@Override
	public Handler getHandler() {
		return m_handler;
	}
}
